package com.neoharvest.smartagri.decorator.impl;

import com.neoharvest.smartagri.decorator.MachineDecorator;
import com.neoharvest.smartagri.model.AgriculturalMachine;

public class GpsTrackingDecorator extends MachineDecorator {
    public GpsTrackingDecorator(AgriculturalMachine decoratedMachine) {
        super(decoratedMachine);
    }

    @Override
    public void updateFuelLevel(double fuelLevel) {
        decoratedMachine.updateFuelLevel(fuelLevel);
    }

    @Override
    public void start() {
        super.start();
        enableGpsTracking();
    }

    @Override
    public String getStatus() {
        return super.getStatus() + " with GPS Tracking";
    }

    @Override
    public String getPosition() {
        return decoratedMachine.getPosition();
    }

    @Override
    public double getFuelLevel() {
        return decoratedMachine.getFuelLevel();
    }

    @Override
    public void updatePosition(String position) {
        decoratedMachine.updatePosition(position);
    }

    private void enableGpsTracking() {
        System.out.println("GPS Tracking enabled");
    }
    
    @Override
    public String getCurrentTask() {
        return decoratedMachine.getCurrentTask();
    }
}